package br.com.news.service;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

import br.com.news.utils.business.exception.BusinessException;
import br.com.news.utils.business.interfaces.IComentarioBusiness;
import br.com.news.utils.database.beans.ComentarioBean;
import br.com.news.utils.service.exception.ServiceException;
import br.com.news.utils.service.interfaces.IComentarioService;

@Named
public class ComentarioService implements IComentarioService{

	@Inject
	private IComentarioBusiness comentarioBusiness;

	@Override
	public List<ComentarioBean> findAll() throws ServiceException {
		try {
			return comentarioBusiness.findAll();
		} catch (BusinessException e) {
			throw new ServiceException(e);
		}
	}
	
}
